<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );

/**
 * Chcode Group class.
 */
class Chcode_group_model extends CI_Model {
	private $db_name = 'k9deploy_new';
	private $table = 'chcode_group';
	private $db = null;
	
	/**
	 * Constructor
	 *
	 * Sets the database used for
	 * information.
	 */
	public function __construct() {
		parent::__construct ();
		
		$this->db = $this->load->database ( $this->db_name, TRUE );
	}
	/**
	 * get group by os
	 *
	 * @param
	 *        	unknown app info
	 */
	public function get_group_by_os($os) {
		if ($os != 0) {
			$where = array (
					'os' => $os 
			);
			$this->db->where ( $where );
		}
		$query = $this->db->get ( $this->table );
		return $query->result_array ();
	}
	
}